%% 数据存储
function [DATA,HEX]=data_save(ADSB_DATA)
HEX=strings(); %创建一个字符串数组HEX存储hex
DATA=[]; %矩阵DATA储存数据信息
j=1;
for i=1:1:length(ADSB_DATA)
    X=ADSB_DATA(i).devlon; %lon
    Y=ADSB_DATA(i).devlat; %lat
    if X~=0 && Y~=0
        HEX(j,1)=ADSB_DATA(i).hex; %存储hex
        DATA(j,1)=ADSB_DATA(i).devlon; %lon
        DATA(j,2)=ADSB_DATA(i).devlat; %lat
        DATA(j,3)=ADSB_DATA(i).nic; %nic
        DATA(j,4)=ADSB_DATA(i).gs; %速度
        DATA(j,5)=ADSB_DATA(i).alt_geom; %高度
        DATA(j,6)=ADSB_DATA(i).timeseqno; %时间
        j=j+1;
    end
end

end

